﻿using ConfigCreate.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConfigCreate
{
    /// <summary>
    /// 文本框控件
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
    public class CreateTextBoxAttribute : CreateBaseAttribute
    {
        /// <summary>
        /// 文本框控件
        /// </summary>
        /// <param name="header_name">大类别名</param>
        /// <param name="group_name">组名</param>
        /// <param name="title">控件标题</param>
        public CreateTextBoxAttribute(string header_name, string group_name, string title) : base(header_name, group_name, title)
        { }

        /// <summary>
        /// 文本框内辅助内容
        /// </summary>
        public string? Placeholder { get; set; }
        /// <summary>
        /// 文本框内容长度
        /// </summary>
        public int? TextLenght { get; set; }
        /// <summary>
        /// 是否显示清空按钮
        /// </summary>
        public bool ShowClearButton { get; set; } = true;
        /// <summary>
        /// 是否为只读模式
        /// </summary>
        public bool IsReadonly { get; set; }
        /// <summary>
        /// 是否为多行文本
        /// </summary>
        public bool IsMultiline { get; set; }
        /// <summary>
        /// 控件高度，此属性只有当IsMultiline为True时生效
        /// </summary>
        public double Height { get; set; } = 60d;
    }
}
